﻿package org.leles.aom.objects 
{
	import org.leles.aom.Activity;
	import org.leles.aom.objects.ActivityObject;
	
	/**
	 * ...
	 * @author Bruno Leles
	 */
	public class User extends ActivityObject
	{
		protected var oid:* = 0;
		
		public function User(activity:Activity = null, oid:* = 0) 
		{
			super(activity);
			this.oid = oid;
		}
		
		protected function getUserReference():Object 
		{
			var user:Object = activity.callDriverMethod( 'Users_GetUserReference', [oid] );
			if ( user == null )
				user = { };
			return user;
		}
		
		public function get eMail():String { return getUserReference().EMail; }
		
		public function get globalIP():String { return getUserReference().GlobalIP; }
		
		public function get localIP():String { return getUserReference().LocalIP; }
		
		public function get name():String { return getUserReference().Name; }
		
		public function get puid():String { return getUserReference().PUID; }
		
	}

}